<?php
	/*数组合并
	*@param list1:数组1 list2:数组2
    *@return list 
	*/
	function pack_arr($list1,$list2){
		if($list1 && $list2){
			$list = array_merge($list1,$list2);
		}elseif($list1 && $list2 == null){
			$list = $list1;
		}elseif($list2 && $list1 == null){
			$list = $list2;
		}else{
			$list = null;
		}
		return $list;
	}
	
	//请求过滤,只能post请求
	function request_filter(){
		if($_SERVER['REQUEST_METHOD'] == "GET"){
			$msg['errcode'] = 1;
			$msg['message'] = "非法操作";
			echo json_encode(array('data'=>$msg));
			die;
		}
	}
	
?>